package rmi;

import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.ArrayList;

import po.UserIdentity;

import vo.BLToViewResultMessage;
import vo.BookVO;
import vo.CatalogVO;
import vo.CustomerBasicInfoVO;
import vo.GiftVO;
import vo.GradeSetVO;
import vo.OrderVO;
import vo.SalePolicyVO;
import vo.UserVO;
import exception.GiftNotFoundException;
import exception.MemberNotFoundException;
import exception.OrderNotExistException;
import exception.PointsNotInRangeException;
import exception.GiftAlreadyExistException;
import exception.UserDeletedException;
import exception.UserNotExistException;
import exception.UserNotFoundException;
import exception.WrongPasswordException;

public interface StaffServiceRemote extends Remote {

	public ArrayList<GiftVO> getGiftList() throws RemoteException;
	
	public ArrayList<CustomerBasicInfoVO>getMemberList() throws RemoteException;
	
	public BLToViewResultMessage addGift(GiftVO gift) throws RemoteException;
	
	public BLToViewResultMessage present(int giftID, int memberID)throws 
	                                     MemberNotFoundException, GiftNotFoundException,
	                                     PointsNotInRangeException,GiftAlreadyExistException,RemoteException;
    
	public BLToViewResultMessage salePolicy(SalePolicyVO salePolicy)throws RemoteException;
    
    public BLToViewResultMessage MassPromotion(int GiftID,GradeSetVO gradeSet)
    		throws GiftNotFoundException,RemoteException, GiftAlreadyExistException;
    
	public ArrayList<OrderVO> viewMemberOrder(int memberID) 
			throws MemberNotFoundException,OrderNotExistException,RemoteException;
	
	public OrderVO viewOrder(int orderID)
			throws OrderNotExistException,RemoteException;
	
	public BLToViewResultMessage changeOrderState(int orderID)
			throws OrderNotExistException,RemoteException;
	
	public ArrayList<CatalogVO> getCatalogList() throws RemoteException;
	
	public BLToViewResultMessage addCatalog(String catalogName) throws RemoteException;
	
	public BLToViewResultMessage deleteCatalog(int catalogID)throws RemoteException;
	
	public BLToViewResultMessage modifyCatalog(int catalogID, String catalogName)
			throws RemoteException;
	
	public ArrayList<BookVO> getBookList() throws RemoteException;
	
	public BLToViewResultMessage addBook(BookVO book, int quantity)throws RemoteException;
	
	public BLToViewResultMessage deleteBook(int bookID) throws RemoteException;
	
	public BLToViewResultMessage modifyBook(int bookID, BookVO book)throws RemoteException;
	
	public BLToViewResultMessage checkUsername(String username) throws RemoteException;
	
	public int requireLogin(String username, String password,
			UserIdentity userIdentity) throws WrongPasswordException,
			UserDeletedException, UserNotExistException,RemoteException;
	
	public BLToViewResultMessage changePassword(int userID, String newPassword)
			throws UserNotFoundException, RemoteException;
	
	public CustomerBasicInfoVO requireMemberInfo(int memberID)
			throws MemberNotFoundException, RemoteException;
	
	public ArrayList<UserVO> getUserList() throws RemoteException;

	public BLToViewResultMessage addUser(UserVO user) throws RemoteException;

	public BLToViewResultMessage deleteUser(int userID) throws RemoteException;

	public BLToViewResultMessage modifyUser(int userID, UserVO user) throws RemoteException;


}


